<?php

Class Full_article_to {
	
	private $article;
	private $basic_categories;
	private $descriptions;
	private $links;
	private $images;
	private $videos;
	private $comments;
	
	
	public function __construct($article, $basic_categories, $descriptions, 
									$links, $images, $videos, $comments) {
		$this->article = $article;
		$this->basic_categories = $basic_categories;
		$this->description = $descriptions;
		$this->links = $links;
		$this->image = $images;
		$this->video = $videos;
		$this->comment = $comments;
	}
	
	public function get_article() {
		return $this->article;
	}
	
	public function get_basic_categories() {
		return $this->basic_categories;
	}
	
	public function get_descriptions() {
		return $this->descriptions;
	}
	
	public function get_links() {
		return $this->links;
	}
	
	public function get_images() {
		return $this->images;
	}
	
	public function get_videos() {
		return $this->videos;
	}
	
	public function get_comments() {
		return $this->comments;
	}
	
	public function equals($object) {
		if ((get_class($this) != get_class($object)) ||
				($object == null))				
			 return false;
		else {
			if (($this->article == $object->get_article()) &&
				($this->basic_categories == $object->get_basic_categories()) &&
				($this->descriptions == $object->get_descriptions()) &&
				($this->links == $object->get_links()) &&
				($this->images == $object->get_images()) &&
				($this->videos = $object->get_videos()))
				return true;
			return false;
		}
	}
	
	public function to_string() {
		$string = 'article: ' . $this->article->to_string() . ' | ';
		$string = $string . 'categories: ';		
		foreach ($this->basic_categories as $category) 
			$string = $string . $category->to_string() . ' | ';
		if (!$this->descriptions == NULL) {
			$string = $string . 'descriptions: '; 
			foreach ($this->descriptions as $description)
				$string = $string .  $description->to_string() . ' | ';
		}
		if (!$this->links == NULL) {
			$string = $string . 'links: ';		
			foreach ($this->links as $link) 
				$string = $string . $link->to_string() . ' | ';
		}
		if (!$this->images == NULL) {
			$string = $string . 'images: '; 
			foreach ($this->images as $image)
				$string = $string . $this->image->to_string() . ' | ';
		}
		if (!$this->videos == NULL) {
			$string = $string . 'videos: ';
			foreach ($this->videos as $video)
				$string = $string . $this->video->to_string();
		}	
		
		return $string;						
	}

}

?>